<html>
<head>
<meta charset="UTF-8">
<title>角色控制配置表修改</title>
<link id="easyuiTheme"  href="../../static/easyui/themes/bootstrap/easyui.css" rel="stylesheet" type="text/css"/>
<link href="../../static/easyui/themes/icon.css" rel="stylesheet" type="text/css"/>
<link href="../../static/css/esaas-easyui-edit.css" rel="stylesheet" type="text/css"/>
<script src="../../static/easyui/jquery.min.js" type="text/javascript"></script>
	<script src="../../static/easyui/jquery.cookie.js" type="text/javascript"></script>
	<script src="../../static/easyui/ui-theme.js" type="text/javascript"></script>
<script src="../../static/easyui/jquery.easyui.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../static/easyui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.util.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.jquery.ajax.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.easyui.util.js" type="text/javascript"></script>
<script src="../../ffres/dict/all.js" type="text/javascript"></script>
<script src="../../static/js/validator.js" type="text/javascript"></script>
<a href="" target="_blank" id="commonLink" name="commonLink"></a>
</head>
<body class="easyui-layout" scroll="no">
	<form id="ff" method="post">
		<div class="esaas-info-title">角色控制配置表信息</div>
		<table class="esaas-info-edit-table">
			<tr>
				<td width="15%" align="right">角色码：</td>
				<td width="35%"><input class="easyui-textbox" type="text" readOnly
					name="roleno" data-options="required:true"
					style="width: 100%; height: 25px;"></input></td>
				<td width="15%" align="right">角色名称：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="rolename" data-options="required:true" validType="maxLength[40]"
					style="width: 100%; height: 25px;"></input></td>
			</tr>
			<tr>
				<!--<td width="15%" align="right">排序字段：</td>-->
				<!--<td width="35%"><input class="easyui-textbox" type="text" -->
					<!--name="orderno" data-options="required:false, prompt:'请输入整数'"-->
					<!--style="width: 100%; height: 25px;"></input></td>-->
				<td width="15%" align="right">类型：</td>
				<td width="35%"><select class="easyui-combobox"
										name="type" style="width: 100%; height: 25px;"
										data-options="required:false,editable:false,valueField:'enname',textField:'cnname',data:ROLE_TYPE">
								</select></td>
				<td width="15%" align="right">机构号：</td>
				<td width="35%"><input class="easyui-textbox" type="text"
									   name="orgid" data-options="required:false, validType:'length[0,16]'"
									   style="width: 100%; height: 25px;"></input></td>
			</tr>
			<tr>
				<td width="15%" align="right">备注：</td>
				<td width="85%" colspan="3"><input class="easyui-textbox" type="text"
					   name="memo" data-options="multiline: true, validType:'length[0,60]'"
					   style="width: 100%; height: 50px;"></input></td>
			</tr>
		</table>
	</form>
	<div class="esaas-info-buttons">
		<a href="javascript:void(0)" class="easyui-linkbutton " iconCls="icon-ok" onclick="submitForm()" style="width:90px">&nbsp;保&nbsp;存&nbsp;</a>
		<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="closeForm()" style="width:90px">&nbsp;关&nbsp;闭&nbsp;</a>
	</div>
	<script>		
		$(function() {
            addTitle("修改");

            var roleno = $.getUrlParam('roleno');
			$.restfulGet('../../api/s/role/' + roleno,null,function(data){
					$('#ff').form('load', {
						roleno : data.rows.roleno,
						rolename : data.rows.rolename,
						orderno : data.rows.orderno,
						type : data.rows.type,
						memo : data.rows.memo,
						orgid : data.rows.orgid
					});					
			});
		});
	
		function submitForm() {
			if (!$('#ff').form('validate'))
				return;
			var jsonData = $("#ff").serializeJson();
			$.restfulPut('../../api/s/role', jsonData, function(data) {
				window.parent.reloadList();
			});
		};
		
		function closeForm(){
			window.parent.JLEUtil.closewin();
		}
	</script>
</body>
</html>
